//
//  GoodShopModel.m
//  BTRIP
//
//  Created by johnbk on 15/11/12.
//  Copyright © 2015年 johnbk. All rights reserved.
//

#import "GoodShopModel.h"

@implementation GoodShopModel
-(void)dealloc{
	[_url release];
	[_id release];
	[_name release];
	[_address release];
	[_title release];
	[_cates release];
	[_consumption_per_person release];
	[super dealloc];
}

- (void) setValue:(id)value forKey:(NSString *)key{
	if ([key isEqualToString:@"cates"]) {
		NSMutableArray *array = [NSMutableArray array];
		for (NSDictionary *dictionary in value) {
			[array addObject:[dictionary objectForKey:@"title"]];
		}
		self.cates = array;
		self.title = self.cates[0];
	}
	else if ([key isEqualToString:@"cover"]){
		self.url = [value objectForKey:@"url"];
	}
	else{
		[super setValue:value forKey:key];
	}
	
}
@end
